<%@ include file="makecon.jsp" %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<script type="text/javascript">
function validate()
{
var form =document.register
if(form.uniname.value=="")
{
alert("User Name is Required");
form.uniname.value="";
form.uniname.focus();
return false;
}
var exp= /^[a-zA-Z]+$/;

 if(!form.uniname.value.match(exp))
{
alert("enter charactors only");
form.uniname.value="";
form.uniname.focus();
return false;
}
 if(form.uniloc.value=="")
{
alert("Pass Word is Required");
form.uniloc.value="";
form.uniloc.focus();
return false;
}  
var exp= /^[a-zA-Z]+$/;

 if(!form.uniloc.value.match(exp))
{
alert("university name must be in charactors");
form.uniloc.value="";
form.uniloc.focus();
return false;
}
else if(form.uniadd.value=="")
{
alert("Pass Word is Required");
form.uniadd.value="";
form.uniadd.focus();
return false;
}  
else if(form.webadd.value=="")
{
alert("Pass Word is Required");
form.webadd.value="";
form.webadd.focus();
return false;
}  


return true;
}
</script>



<TITLE></TITLE>
</HEAD>
<BODY background="images/17.jpg">
<form action="edu_Adduni.jsp" method=post name="register" onsubmit="return validate()">

<%!  	
	ResultSet rs = null;
%>
<%! String strr;%> 
<%! int unid,colid,courseid;%>
<% try
	{
	String cmd="select max(univid) from univers_det";
	rs=st.executeQuery(cmd);
	if(rs.next())
		{
		unid=rs.getInt(1)+1;
		System.out.println("Max Univer id:"+unid);
		}
	else
		{
	   	unid=500;
		System.out.println("Max:"+unid);
		}

}catch(Exception e){System.out.println("Exception..."+e);}
%>


<TABLE border=0 cellPadding=1 cellSpacing=1 style="HEIGHT: 34px; WIDTH: 192px" 
width="100%" align="center">
  <TR><br>
    <TD  align="center" nowrap="nowrap"><FONT color=darkmagenta size=5><STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;University 
      Details</STRONG></FONT></TD></TR>
  <TR align="left">
   <TD><br></TD></TR>  
  </TABLE>
<br><br>

<TABLE border=0 cellPadding=1 cellSpacing=1 width="65%" align="center">  

  <TR>
    <TD><FONT color=darkred><STRONG>University Id</STRONG></FONT></TD>
    <TD><INPUT type=text id=text1 name=uniid value="<%=unid%>" readonly></TD>
  </TR>
  <TR>
    <TD><FONT color=darkred><STRONG>University Name</STRONG></FONT></TD>
    <TD><INPUT id=text2 name=uniname></TD>
  </TR>
  <TR>
    <TD><FONT color=darkred><STRONG>Univesity Location</STRONG></FONT></TD>
    <TD><INPUT id=text3 name=uniloc></TD>
  </TR>
  <TR>
    <TD><FONT color=darkred><STRONG>Univesity Address</STRONG></FONT></TD>
    <TD><INPUT id=text4 name=uniadd></TD>
  </TR>
  <TR>
    <TD><FONT color=darkred><STRONG>Web Address of 
    University</STRONG></FONT></TD>
    <TD><INPUT id=text5 name=webadd></TD>
   </TR>

		<tr>
		<td height="32"></td>
		<td><INPUT id=submit1 name=submit1 type=submit value=Submit>&nbsp;&nbsp;&nbsp;
		<INPUT id=reset1 name=reset1  type=reset value=Reset>
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<A href="edu_test.htm" target=right>Back</A>
		</td></tr>
</TABLE>



